﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Photography
{
    public partial class Error : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Session["LastError"] != null && Session["LastError"] is Exception)
                    lblException.Text = Session["LastError"].ToString();
                Page.Title = "Error occurred";
                string PreviousUri = Request["aspxerrorpath"];
                if (!string.IsNullOrEmpty(PreviousUri))
                {
                    pnlError.Visible = true;
                    hlinkPreviousPage.NavigateUrl = PreviousUri;
                }
            }
            catch
            {
            }
        }
    }
}